/**
 * Created by admin on 2017/3/22.
 */
var express = require("express");
var app = express();
var router = express.Router();
var bodyParser = require('body-parser');
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();

app.get("/",function(req,res){

    console.log("get  请求");
    console.log(req.query);
    res.json(req.query)
    res.send();
});

app.use(bodyParser.urlencoded({ extended: false }));
app.use(multipartMiddleware);

app.post("/",function(req,res){
    console.log("post  请求");
    console.log(req.body);
    res.json(req.body);
    res.send();
});

app.listen(3000);







